using System.Globalization;
using System.Windows;
using System.Windows.Data;

namespace Koala.Pro.Helpers;

public class ResourceNameConverter : IValueConverter
{
    public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
    {
        if (value is string resourceKey)
        {
            return new StaticResourceExtension(resourceKey);
        }
        return null;
    }

    public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
    {
        throw new NotImplementedException();
    }
}
